﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using NUnit.Framework;
using ScrappyDB.UnitTests.AwsQuery101Examples;

namespace ScrappyDB.UnitTests
{
    [TestFixture]
    public class MethodChainingTests
    {
        /// <summary>
        /// Test method chaining linq syntax
        /// </summary>
        [Test]
        public void MethodChainingNotEqualsTest()
        {
            const string expectedSql1 = "select * from `mydomain` where `name` != 'John'";

            var context = new TestEntityContext();

            var queryable1 = context.TestEntitys.Where(a => (a.name != "John"));
            var sql1 = context.ToSql<mydomain>(queryable1.Expression);
            Assert.AreEqual(expectedSql1, sql1);
        }
    }
}
